#pragma once

#ifndef uint
using uint = unsigned int;
#endif

#include "CircleRender.h"

class CudaRenderer : public CircleRenderer
{
    private:
        Image* image;
        SceneName sceneName;

        int num_Circles;
        float* positions;
        float* velocitys;
        float* colors;
        float* radius;

        float* cudaDevicePositions;
        float* cudaDeviceVelocity;
        float* cudaDeviceColor;
        float* cudaDeviceRadius;
        float* cudaDeviceImageData;

    public:
        CudaRenderer();
        virtual ~CudaRenderer();

        const Image* getImage();

        void setup();

        void loadScene(SceneName name);

        void allocOutputImage(int width, int height);

        void clearImage();

        void advanceAnimation();

        void render();

        void shadePixel(int circleIndex,
        float pixelCenterX, float pixelCenterY,
        float px, float py, float pz,
        float* pixelData);
};
